#ifndef __NV_L40_CARD_H__
#define __NV_L40_CARD_H__

#include "interface/pcie_card.h"
#include "interface/pcie_device.h"
#include <mc/engine.h>

namespace dev {

class nv_l40_card : public mc::engine::object<nv_l40_card> {
public:
    MC_OBJECT(nv_l40_card, "PCIeGpuCard", "/bmc/dev/Systems/1/PCIeGpuCard/${object_name}",
              (PCIeDevice)(PCIeCard))

    nv_l40_card()  = default;
    ~nv_l40_card() = default;

    bool start();
    bool stop();
    bool init(mc::mutable_dict& csr_object, const mc::dict& connector);
    bool replace_dynamic_property(mc::mutable_dict& object, const mc::dict& connector);

private:
    PCIeDevice m_pcie_device;
    PCIeCard   m_pcie_card;
    uint8_t    SystemId;

    // NVIDIA扩展属性
    std::string m_gpu_architecture; // GPU架构 (Ampere, Hopper等)
    std::string m_driver_version;   // 驱动版本
    bool        m_nvlink_status;    // NVLink连接状态
};

} // namespace dev

#endif // __nv_l40_CARD_H__